<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:c="http://java.sun.com/jsp/jstl/core">

    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
        <h:outputStylesheet library="standards" name="style.css" />
        <title>HRO | Home</title>
    </h:head>
    <body>

        <div id="container">

            <div id="imgheader">			
                <img src="/hro_service/resources/images/logo.gif" width="226" height="58"/>
            </div>

            <div id="header">
                Welkom
            </div>

            <div id="menu">
                <ul>
                    <li><a href="/HRO_service/pages/present.jsf">Home</a></li>
                </ul>
            </div>

            <div id="inhoud">

                <br/>
                <h:form>

                    <b>Docenten aanwezig:</b><br/><br/>
                    <h:outputText value="Alle docenten zijn afwezig." rendered="#{!presenceManager.hasPresent}" /> 
                    <h:dataTable value="#{presenceManager.present}" var="teacher" styleClass="bordertable" headerClass="bordertableHeader" columnClasses="column1,column2,column3" width = "600" rendered="#{presenceManager.hasPresent}">

                        <h:column>
                            <f:facet name="header">Naam</f:facet>
                            #{teacher.name}
                        </h:column>

                        <h:column>
                            <f:facet name="header">Code</f:facet>
                                #{teacher.code}
                        </h:column>

                        <h:column>
                            <f:facet name="header">Actie</f:facet>
                            <h:commandLink value="afwezig" action="#{presenceManager.callAbsent}">
                                <f:setPropertyActionListener target="#{presenceManager.selected}" value="#{teacher}" />
                            </h:commandLink>
                        </h:column>

                    </h:dataTable>

                    <br/>
                    <br/>

                    <b>Docenten afwezig:</b><br/><br/>
                    <h:outputText value="Alle docenten zijn aanwezig." rendered="#{!presenceManager.hasAbsent}" /> 
                    <h:dataTable value="#{presenceManager.absent}" var="teacher" styleClass="bordertable" headerClass="bordertableHeader" columnClasses="column1,column2,column3" width = "600" rendered="#{presenceManager.hasAbsent}">

                        <h:column>
                            <f:facet name="header">Naam</f:facet>
                                #{teacher.name}
                        </h:column>

                        <h:column>
                            <f:facet name="header">Code</f:facet>
                                #{teacher.code}
                        </h:column>

                        <h:column>
                            <f:facet name="header">Actie</f:facet>
                            <h:commandLink value="aanwezig" action="#{presenceManager.callPresent}">
                                <f:setPropertyActionListener target="#{presenceManager.selected}" value="#{teacher}" />
                            </h:commandLink>
                        </h:column>

                    </h:dataTable>

                </h:form>
            </div>

        </div> 

    </body>
</html>